package com.ctshk.rpc.user.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.SystemBusinessType;
import com.ctshk.common.model.PageResponse;
import com.ctshk.rpc.user.dto.MobileQueryDTO;
import com.ctshk.rpc.user.dto.es.OrderEsDTO;
import com.ctshk.rpc.user.req.MobileQueryReq;
import com.ctshk.rpc.user.req.OrderCancelReq;
import com.ctshk.rpc.user.req.OrderPageReq;

import java.io.Serializable;
import java.util.concurrent.CompletableFuture;

public interface IOrderEsService {


    void saveOrderToEs(Serializable serializable, SystemBusinessType systemBusinessType);

    Result updateOrderToEs();

    Result<PageResponse<OrderEsDTO>> queryPage(OrderPageReq req) throws Exception;

    /**
     * 根据单项类型的订单状态,预订状态,取消状态更新C端个人中心得订单状态
     * @param id 订单id
     * @param type 业务类型
     * @param orderStatus 订单状态
     * @param paymentStatus 支付状态
     * @param scheduledStatus 预订状态
     * @param cancelStatus 取消状态
     * @param queryNumber 查询编号
     * @return
     */
    void updateStatusToEs(Long id,Integer type, Integer orderStatus,Integer paymentStatus, Integer scheduledStatus, Integer cancelStatus,String queryNumber);

    /**
     * 根据单项类型的订单状态,预订状态,取消状态更新C端个人中心得订单状态
     * @param id 订单id
     * @param type 业务类型
     * @param orderStatus 订单状态
     * @param paymentStatus 支付状态
     * @param scheduledStatus 预订状态
     * @param cancelStatus 取消状态
     * @return
     */
    void updateStatusToEs(Long id,Integer type, Integer orderStatus,Integer paymentStatus, Integer scheduledStatus, Integer cancelStatus);

    Result<MobileQueryDTO> queryByReq(MobileQueryReq req) throws Exception;

    Result delete(Long id,Long userId);

    Result deleteAll();

    Result cancel(OrderCancelReq orderCancelReq);


}